/*
 * @Author: zhangweixin 
 * @Date: 2018-11-13 22:53:05 
 * @Last Modified by: zhangweixin
 * @Last Modified time: 2018-11-30 15:21:26
 */
import {createStore, applyMiddleware} from 'redux';
import thunkMiddleware from 'redux-thunk';
import combineReducers from './reducers.js';

import ENV from 'ENV';
let store;
if(ENV.product){
  store = createStore(combineReducers,applyMiddleware(thunkMiddleware));
}else{
  // const createLogger = require('redux-logger');
  // const loggerMiddleware = createLogger();
  const { logger } = require(`redux-logger`);
  // import loggerMiddleware from 'redux-logger'
  store = createStore(combineReducers,applyMiddleware(thunkMiddleware,logger));
}


export default store;